<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>方剂添加</title>

    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>

</head>
<body>

<script>
    {% if flag == 5 %}
        console.log()
    {% elif flag == True%}
         alert("添加成功！")
    {% else %}
        alert("添加失败！")
    {% endif %}

</script>


<div class="container">
    <div class="row">

        <form action="http://127.0.0.1:5000/addPrescription" method="post">

            <h1 class="center text-center">方剂录入</h1>

            <div class="input-group" style="width: 50%; margin-top: 10px">
                <span class="input-group-addon" id="basic-addon3" style="font-size: 20px">方剂名称</span>
                <input required name="name" type="text" class="form-control" id="basic-url"
                       aria-describedby="basic-addon3" placeholder="输入方剂名称" style="font-size: 20px">
            </div>

            <div class="input-group" style=" margin-top: 20px">
                <span class="input-group-addon" id="basic-addon3" style="font-size: 20px">古方</span>
                <textarea name="ancient" type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3"
                          placeholder="输入方剂组成" style="font-size: 20px;height: 150px"></textarea>
            </div>

            <div class="input-group" style=" margin-top: 20px">
                <span class="input-group-addon" id="basic-addon3" style="font-size: 20px">金方</span>
                <textarea name="golden" type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3"
                          placeholder="输入方剂组成" style="font-size: 20px;height: 150px"></textarea>
            </div>


            <div class="input-group" style=" margin-top: 20px">
                <span class="input-group-addon" id="basic-addon3" style="font-size: 20px">方剂方歌</span>
                <textarea name="song" type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3"
                          placeholder="输入方剂组成" style="font-size: 20px;height: 150px"></textarea>

            </div>


            <div class="input-group" style=" margin-top: 20px">
                <span class="input-group-addon" id="basic-addon3" style="font-size: 20px">方剂用法</span>
                <textarea name="usage" type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3"
                          placeholder="输入方剂用法"
                          style="font-size: 20px;height: 150px"></textarea>
            </div>


            <div class="input-group" style=" margin-top: 20px">
                <span class="input-group-addon" id="basic-addon3" style="font-size: 20px">方剂功用</span>
                <textarea name="function" type="text" class="form-control" id="basic-url"
                          aria-describedby="basic-addon3" placeholder="输入方剂功用"
                          style="font-size: 20px;height: 150px"></textarea>
            </div>

            <div class="input-group" style=" margin-top: 20px">
                <span class="input-group-addon" id="basic-addon3" style="font-size: 20px">方剂主治</span>
                <textarea name="major" type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3"
                          placeholder="输入方剂功用"
                          style="font-size: 20px;height: 150px"></textarea>
            </div>

            <div class="input-group" style=" margin-top: 20px">
                <span class="input-group-addon" id="basic-addon3" style="font-size: 20px">方剂方解</span>
                <textarea name="explain" type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3"
                          placeholder="输入方剂功用"
                          style="font-size: 20px;height: 150px"></textarea>
            </div>

            <div class="input-group" style=" margin-top: 20px">
                <span class="input-group-addon" id="basic-addon3" style="font-size: 20px">辩证要点</span>
                <textarea name="DialecticalPoint" type="text" class="form-control" id="basic-url"
                          aria-describedby="basic-addon3"
                          placeholder="输入方剂功用"
                          style="font-size: 20px;height: 150px"></textarea>
            </div>

            <div class="input-group" style=" margin-top: 20px">
                <span class="input-group-addon" id="basic-addon3" style="font-size: 20px">加减变化</span>
                <textarea name="AASchange" type="text" class="form-control" id="basic-url"
                          aria-describedby="basic-addon3"
                          placeholder="输入方剂功用"
                          style="font-size: 20px;height: 150px"></textarea>
            </div>

            <div class="input-group" style=" margin-top: 20px">
                <span class="input-group-addon" id="basic-addon3" style="font-size: 20px">现代应用</span>
                <textarea name="application" type="text" class="form-control" id="basic-url"
                          aria-describedby="basic-addon3"
                          placeholder="输入方剂功用"
                          style="font-size: 20px;height: 150px"></textarea>
            </div>

            <div class="input-group" style=" margin-top: 20px">
                <span class="input-group-addon" id="basic-addon3" style="font-size: 20px">使用注意</span>
                <textarea name="attention" type="text" class="form-control" id="basic-url"
                          aria-describedby="basic-addon3"
                          placeholder="输入方剂功用"
                          style="font-size: 20px;height: 150px"></textarea>
            </div>


            <input type="submit" type="button" class="btn btn-default btn-lg" value="保存"
                   style="margin-left: 40%;margin-top: 40px;width: 200px">
        </form>


    </div>


</div>


<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>

</body>
</html>